package com.sghd.fight.robot.action;

import com.sghd.common.socket.client.Client;
import com.sghd.common.socket.core.Message;
import com.sghd.fight.net.SocketEnum;
import com.sghd.fight.robot.core.Robot;
import com.sghd.pojo.fight.game.RoomType;

import java.util.HashMap;
import java.util.Map;

/**
 * @author frank
 * @date 2019-01-25 11:29
 * @desc
 **/
public class MatchAction extends AbstractAction {

    @Override
    public Stage stage() {
        return Stage.MATCH;
    }

    @Override
    public void action(Robot robot) {
        if (!check(robot)) {
            return;
        }
        Client client = robot.getClient();
        Map<String, Object> enter = new HashMap<>();
        enter.put("type", RoomType.PVE);
        enter.put("bigLevel", 8);
        enter.put("level", 1);
        client.send(Message.valueOf(SocketEnum.MATCH, enter));
    }
}
